Optimal. Leaf size=78 \[ \frac{B (a+i a \tan (c+d x))^n}{d n}-\frac{(B+i A) (a+i a \tan (c+d x))^n \text{Hypergeometric2F1}\left (1,n,n+1,\frac{1}{2} (1+i \tan (c+d x))\right )}{2 d n} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0656323, antiderivative size = 78, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.115, Rules used = {3527, 3481, 68} \[ \frac{B (a+i a \tan (c+d x))^n}{d n}-\frac{(B+i A) (a+i a \tan (c+d x))^n \, _2F_1\left (1,n;n+1;\frac{1}{2} (i \tan (c+d x)+1)\right )}{2 d n} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3527
Rule 3481
Rule 68
Rubi steps
\begin{align*} \int (a+i a \tan (c+d x))^n (A+B \tan (c+d x)) \, dx &=\frac{B (a+i a \tan (c+d x))^n}{d n}-(-A+i B) \int (a+i a \tan (c+d x))^n \, dx\\ &=\frac{B (a+i a \tan (c+d x))^n}{d n}-\frac{(a (i A+B)) \operatorname{Subst}\left (\int \frac{(a+x)^{-1+n}}{a-x} \, dx,x,i a \tan (c+d x)\right )}{d}\\ &=\frac{B (a+i a \tan (c+d x))^n}{d n}-\frac{(i A+B) \, _2F_1\left (1,n;1+n;\frac{1}{2} (1+i \tan (c+d x))\right ) (a+i a \tan (c+d x))^n}{2 d n}\\ \end{align*}
Mathematica [A] time = 7.15504, size = 152, normalized size = 1.95 \[ \frac{2^{n-1} \left (e^{i d x}\right )^n \left (\frac{e^{i (c+d x)}}{1+e^{2 i (c+d x)}}\right )^n \sec ^{-n}(c+d x) (\cos (d x)+i \sin (d x))^{-n} (a+i a \tan (c+d x))^n \left ((n+1) (B-i A)-i n (A-i B) e^{2 i (c+d x)} \text{Hypergeometric2F1}\left (1,1,n+2,-e^{2 i (c+d x)}\right )\right )}{d n (n+1)} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.787, size = 0, normalized size = 0. \begin{align*} \int \left ( a+ia\tan \left ( dx+c \right ) \right ) ^{n} \left ( A+B\tan \left ( dx+c \right ) \right ) \, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \tan \left (d x + c\right ) + A\right )}{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left ({\left (A - i \, B\right )} e^{\left (2 i \, d x + 2 i \, c\right )} + A + i \, B\right )} \left (\frac{2 \, a e^{\left (2 i \, d x + 2 i \, c\right )}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}\right )^{n}}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \left (a \left (i \tan{\left (c + d x \right )} + 1\right )\right )^{n} \left (A + B \tan{\left (c + d x \right )}\right )\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (B \tan \left (d x + c\right ) + A\right )}{\left (i \, a \tan \left (d x + c\right ) + a\right )}^{n}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]